package com.kjlink.internal.workreport.stats.vo;

import com.kjlink.internal.workreport.helper.ReportCommonHelper;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 描述:
 * echarts  简单折线图
 *
 * @author Vic.xu
 * @since 2024-06-27 11:23
 */
public class EchartsSimpleLineVo {

    /**
     * x轴坐标
     */
    private List<String> xAxisData;

    /**
     * y轴数值
     */
    private List<Number> seriesData;

    private List<Object> otherInfo;

    public EchartsSimpleLineVo() {
        xAxisData = new ArrayList<>();
        seriesData = new ArrayList<>();
        otherInfo = new ArrayList<>();
    }

    public List<String> getxAxisData() {
        return xAxisData;
    }

    public void setxAxisData(List<String> xAxisData) {
        this.xAxisData = xAxisData;
    }

    public List<Number> getSeriesData() {
        return seriesData;
    }

    public void setSeriesData(List<Number> seriesData) {
        this.seriesData = seriesData;
    }

    public void addxAxisData(String xAxisData) {
        this.xAxisData.add(xAxisData);
    }

    public void addSeriesData(Integer seriesData) {
        if (seriesData == null) {
            this.seriesData.add(BigDecimal.ZERO);
        } else {
            this.seriesData.add(ReportCommonHelper.toPersonDaysNumber(seriesData.intValue()));
        }
    }

    public void addOtherInfo(Object otherInfo) {
        this.otherInfo.add(otherInfo);
    }

    public List<Object> getOtherInfo() {
        return otherInfo;
    }

    public void setOtherInfo(List<Object> otherInfo) {
        this.otherInfo = otherInfo;
    }
}
